using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;

namespace Krile.Forms.Dialogs.Show
{
    public partial class Firstboot : Form
    {
        public Firstboot()
        {
            InitializeComponent();
        }

        private void headerPanel_Paint(object sender, PaintEventArgs e)
        {
            Rectangle rect1 = headerLabel.ClientRectangle;
            rect1.Height /= 2;
            Rectangle rect2 = rect1;
            rect2.Y = rect1.Height;
            //rect2 = headerLabel.ClientRectangle;
            using (LinearGradientBrush lgb = new LinearGradientBrush(rect1, Color.DodgerBlue, Color.CornflowerBlue, LinearGradientMode.Vertical))
            {
                lgb.GammaCorrection = true;
                e.Graphics.FillRectangle(lgb, rect1);
            }
            using (LinearGradientBrush lgb = new LinearGradientBrush(rect2, Color.Blue, Color.RoyalBlue, LinearGradientMode.Vertical))
            {
                lgb.GammaCorrection = true;
                e.Graphics.FillRectangle(lgb, rect2);
            }
        }


        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Rectangle rect = new Rectangle(0, 0, logoPicture.Right, this.Height);
            rect.Width /= 2;
            using (LinearGradientBrush lgb = new LinearGradientBrush(rect, Color.SkyBlue, Color.White, 0f))
            {
                e.Graphics.FillRectangle(lgb, rect);
            }
        }
    }
}